package com.dc.di.transport.ftp;

import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.SessionContext;
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.transport.TransportListener;

import com.dc.di.ftpserver.InnerFtpServer;

public class InnerFTPTransportListener implements TransportListener {
	
	protected ConfigurationContext config = null;
		
	protected InnerFtpServer innerFtpServer= null;
	
	
	@Override
	public void init(ConfigurationContext config, TransportInDescription arg1) throws AxisFault {
		this.config = config;
	}

	@Override
	public void start() throws AxisFault {
		innerFtpServer = InnerFtpServer.getInstance();
		try {
			innerFtpServer.startServer();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}

	@Override
	public void stop() throws AxisFault {
		innerFtpServer.stopServer();
	}

	@Override
	public void destroy() {
	}

	@Override
	public EndpointReference getEPRForService(String arg0, String arg1) throws AxisFault {
		return null;
	}

	@Override
	public EndpointReference[] getEPRsForService(String arg0, String arg1) throws AxisFault {
		return null;
	}

	@Override
	public SessionContext getSessionContext(MessageContext arg0) {
		return null;
	}

}
